﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AiXiu.Model;

namespace AiXiu.IDAL
{
    /// <summary>
    /// 登录注册表操作接口
    /// </summary>
    public interface ILoginAndRegisterDAL
    {
        /// <summary>
        /// 通过用户名查找登录信息
        /// </summary>
        /// <param name="UserName">登录用户名</param>
        /// <returns>获取的登录信息</returns>
        TBLogins getLoginByUserName(string UserName);

        /// <summary>
        /// 注册用户
        /// </summary>
        /// <param name="reg">注册信息</param>
        /// <returns>是否成功</returns>
        int? register(TBLogins reg);

        /// <summary>
        /// 通过手机号查找登录信息
        /// </summary>
        /// <param name="mobileNumber">给定的手机号</param>
        /// <returns>查询到的数据</returns>
        TBLogins getLoginByMobileNumber(string mobileNumber);

        /// <summary>
        /// 通过Id查找登录信息
        /// </summary>
        /// <param name="id">登录信息的Id</param>
        /// <returns>查询到的数据</returns>
        TBLogins getLoginById(int id);
    }
}
